package music_store.ms.service;

import com.github.pagehelper.PageInfo;
import music_store.ms.common.ServerResponse;
import music_store.ms.pojo.Music;
import org.springframework.stereotype.Service;

import javax.servlet.http.HttpSession;

public interface IMusicService {

    ServerResponse getMusicDetailById(Integer musicId);

    ServerResponse<PageInfo> searchMusicByMusicName(String musicName, int pageNum, int pageSize);

    ServerResponse<PageInfo> searchMusicByArtist(String artist, int pageNum, int pageSize);

    ServerResponse<PageInfo> searchMusicByAlbumName(String albumName, int pageNum, int pageSize);

    ServerResponse searchMusicByMusicId(Integer musicId);

    ServerResponse addLikesMusic (Integer musicId,Integer userId);

    //backend
    ServerResponse addOrUpdateMusic(Music music);

    ServerResponse setSaleStatus(Integer musicId , Integer status);

    ServerResponse<PageInfo> getMusicList(int pageNum, int pageSize);

}
